﻿/******************************************************************************
 *      Class:      WeatherDataPointCollection
 *      Authors:    Michael Slezak, Samuel Harrington
 *      Extends:    ObservableCollection<WeatherDataPoint>
 *      
 * ----------------------------------------------------------------------------
 * 
 *      Description:
 *          This is a collection that only emits CollectionChangedEvents when
 *          the user specifies by calling Sendupdate
 *          
 ******************************************************************************/

////////////////////////////////////////////////////////////////////////////////
//   INCLUDES
////////////////////////////////////////////////////////////////////////////////
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Collections.Generic;

namespace WeatherStationProgram
{
    class WeatherDataPointCollection : ObservableCollection<WeatherDataPoint>
    {
        /// <summary>
        /// Do not provide collection changed notices
        /// </summary>
        /// <param name="e"></param>
        protected override void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
        }

        /// <summary>
        /// Actually send a collection changed notice
        /// </summary>
        public void SendUpdate()
        {
            base.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
        }
    }
}
